package com.imooc.bilibili.api;

import com.imooc.bilibili.service.DemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ye
 */
@RestController
@RequestMapping("/querys")
public class DemoApi {
    
    @Autowired
    private DemoService demoService;


    @GetMapping("/{id}")
    public Long getById(@PathVariable Long id) {
        
        return demoService.getId(id);
    }
    
}
